package com.lipi.mall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;


/**
 * 使用rabbit MQ
 * 1、引入依赖,会自动引入RabbitTemplate、AmqpAdmin、CachingConnectionFactory、RabbitMessagingTemplate
 * 2、@EnableRabbit
 *      spring.rabbitmq.addresses=192.168.56.10
 *      spring.rabbitmq.port=5672
 *      spring.rabbitmq.virtual-host=/
 * 3、配置序列化机制
 * 4、@EnableRabbit开启功能
 * 5、监听消息 @RabbitListener 使用在类或方法上 or @RabbitHandle 使用在方法上
 *
 *
 */
@EnableRabbit
@SpringBootApplication
@MapperScan("com.lipi.mall.order.dao")
@EnableDiscoveryClient
@EnableRedisHttpSession
@EnableFeignClients
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

}
